﻿#region Using declarations
using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Strategy;
#endregion

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
    /// <summary>
    /// This file holds user defined strategy method.
    /// </summary>
    partial class Strategy
    {
        ///Cumulative dollar total of all closed-out trades, both winning and losing.
        public double NetProfit()
        {
            double totalProfitPoints = 0;
            foreach (Trade trade in Performance.AllTrades)
            {
                totalProfitPoints += trade.ProfitCurrency;
            }
            return totalProfitPoints;
        }

    }
}
